//
//  LandingRecordTableViewCell.m
//  ChineseCollegeStudentsNetwork
//
//  Created by 刘喆 on 2018/5/14.
//  Copyright © 2018年 刘喆. All rights reserved.
//

#import "LandingRecordTableViewCell.h"

@implementation LandingRecordTableViewCell

#pragma mark - Init
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self createSubviews];
    }
    return self;
}

#pragma mark - Subviews
#pragma amrk layout subviews
- (void)layoutSubviewsInView {
    [_dateL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(kDeviceWidth/3);
        make.top.offset(5);
        make.bottom.offset(-5);
        make.left.offset(10);
    }];
    
    [_timeL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kDeviceWidth/3);
        make.width.mas_equalTo(kDeviceWidth/3);
        make.centerY.equalTo(self.contentView);
    }];
    
    [_IpaddressL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(kDeviceWidth/3*2);
        make.width.mas_equalTo(kDeviceWidth/3);
        make.centerY.equalTo(self.contentView);
    }];
}

#pragma mark create subviews
- (void)createSubviews {
    [self.contentView addSubview:self.dateL];
    [self.contentView addSubview:self.timeL];
    [self.contentView addSubview:self.IpaddressL];
    
    [self layoutSubviewsInView];
}

- (UILabel *)dateL {
    if (!_dateL) {
        _dateL = [[UILabel alloc] init];
        _dateL.textAlignment = NSTextAlignmentCenter;
        _dateL.textColor = kRGB(153, 153, 153, 1);
        _dateL.numberOfLines = 2;
    }
    return _dateL;
}

- (UILabel *)timeL {
    if (!_timeL) {
        _timeL = [[UILabel alloc] init];
        _timeL.textColor = kRGB(153, 153, 153, 1);
        _timeL.textAlignment = NSTextAlignmentCenter;
    }
    return _timeL;
}

- (UILabel *)IpaddressL {
    if (!_IpaddressL) {
        _IpaddressL = [[UILabel alloc] init];
        _IpaddressL.textColor = kRGB(153, 153, 153, 1);
        _IpaddressL.textAlignment = NSTextAlignmentCenter;
    }
    return _IpaddressL;
    
}


@end
